/*
 * @Author: zhangHang
 * @Date: 2019-08-15 10:59:28
 * @Description: 游戏开始场景
 */
class StartScene extends BaseScene 
{
    protected initView () {
        const cat:egret.Bitmap = GameUtil.createBitmapByName('cat_start_bg');
        this.addChild(cat)
        cat.x = (GameUtil.getStageWidth() - cat.width) / 2
        cat.y = (GameUtil.getStageHeight() - cat.height) / 2 + 100

        const startBtn:egret.Bitmap = GameUtil.createBitmapByName('btn_start');
        this.addChild(startBtn)
        startBtn.x = (GameUtil.getStageWidth() - startBtn.width) / 2
        startBtn.y = cat.y + cat.height
        GameUtil.bitmapToBtn(startBtn, ()=>{
            console.log('开始游戏');
            n.GameData.level = 0;
            SceneController.showPlayScene()
        })
    }
}